import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from '@/views/Home'
import News from '@/views/News'
import Sports from '@/views/Sports'
import Tyhome from '@/views/second/Tyhome'
import Tynews from '@/views/second/Tynews'
import Gwsports from '@/views/second/Gwsports'


Vue.use(VueRouter)

const rouster = new VueRouter({
    routes: [
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            component: Home
        },
        {
            path: '/news',
            component: News
        },
        {
            path: '/sports',
            component: Sports,
            children: [
                {
                    path:'/tyhome',
                    component:Tyhome
                },
                {
                    path:'/tynews',
                    component:Tynews
                },
                {
                    path:'/gwsports',
                    component:Gwsports
                }
            ]
        }

    ]
})
export default rouster

